<?php


namespace app\lib\qiniu;

use think\facade\Config;
use LinCmsTp5\admin\model\LinFile;
use app\lib\exception\file\FileException;
abstract class Qiniu
{
    //七牛accesskey
    protected $accessKey;
    //七牛secretKey
    protected $secretKey;
    //文件存储对象
    protected $file;
    //需要上传的空间
    protected $bucket;
    //域名
    protected $domain;

    /**
     * Files constructor.
     * @param $file
     */
    public function __construct($file)
    {
        //是否传入数据
        $this -> file = $file;
        $this -> accessKey = config()['qiniu']['accessKey'];
        $this -> secretKey = config()['qiniu']['secretKey'];
        // 要上传的空间
        $this->bucket = config()['qiniu']["bucket"];
        //域名
        $this->domain = config()['qiniu']["domain"];
    }

    abstract public function upload();




}